<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>隐藏和显示</title>
    <style>
        div:first-child{
            border:1px solid red;
            width: 500px;
            height: 300px;
            background-color:green;
        }
        /* 第二个div */
        div:first-child+div{
            border:1px solid red;
            width: 500px;
            height: 300px;
            background-color:blue;

            /* 隐藏 - 不占位置 */
            /* display:none; */

            /* 隐藏 - 占位置 */
            visibility:hidden;

        }


        div:last-child{
            border:1px solid red;
            width: 500px;
            height: 300px;
            background-color:greenyellow;
        }

    
    
    
    
    
    </style>
    
</head>
<body>
    <div>

    </div>
    <div>

    </div>
    <div>

    </div>
    <div>

    </div>
</body>
</html>